<?php $request = sfContext::getInstance()->getRequest(); ?>
<?php if($cell['subtype'] == 'primary_key'): ?>
  <a href="javascript:createDialog('<?php echo url_for(array('table'=>$request->getParameter('table'),'action'=> 'show', 'id'=>$cell['value'])); ?>')"><?php echo $cell['value']; ?></a>      
<?php elseif($cell['cmsFieldType']['name'] == 'media'): include_partial('field/media', array('field'=>$cell, 'request'=>$request, 'key'=>$key)); ?>  
<?php else: if(strlen($cell['value']) >= 100) echo substr ($cell['value'],0,100) . '...'; else echo $cell['value']; endif; ?>